extends EditorInspectorPlugin

var generateBtn : Button
var findpathBtn : Button
var importBnt : Button
var exportBtn : Button
var colliderTestBtn : Button

func _can_handle(object):
	return object as PathBuilder != null
	
func _parse_group( object: Object, group: String):
	var path_builder = object as PathBuilder
	if group == "Volume":
		generateBtn = Button.new()
		generateBtn.text = "Generate"
		generateBtn.pressed.connect( path_builder.build_road_map )
		add_custom_control( generateBtn )
		
		importBnt = Button.new()
		importBnt.text = "Import Space Info"
		importBnt.pressed.connect( path_builder.import_space_info )
		add_custom_control( importBnt )
		
		exportBtn = Button.new()
		exportBtn.text = "Export Space Info"
		exportBtn.pressed.connect( path_builder.export_space_info )
		add_custom_control( exportBtn )
		
		colliderTestBtn = Button.new()
		colliderTestBtn.text = "Test Collider Res"
		colliderTestBtn.pressed.connect( path_builder.test_detector_res )
		add_custom_control( colliderTestBtn )
		
	elif group == "Build Path":
		findpathBtn = Button.new()
		findpathBtn.text = "Find Path"
		findpathBtn.pressed.connect( path_builder.build_path )
		add_custom_control( findpathBtn )
	pass
